package com.usian.wemedia.controller.v1;

import com.usian.common.dtos.ResponseResult;
import com.usian.model.media.dtos.WmUserLoginDto;
import com.usian.wemedia.service.IWmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Fay
 * @date 2022/7/7&10:47
 */
@RestController
@RequestMapping("/login")
public class WmLoginController {
    @Autowired
    private IWmUserService wmUserService;

    @PostMapping("/in")

    public ResponseResult<Map<String,Object>> login(@RequestBody WmUserLoginDto wmUserLoginDto){
        Map<String, Object> login = wmUserService.login(wmUserLoginDto);
        return ResponseResult.ok(login);
    }
}
